package com.cskaoyan.market.controller;

import com.cskaoyan.market.db.domain.MarketAddress;
import com.cskaoyan.market.service.MarketAddressService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

/**
 * @Author: 付诚
 * @Date: 2024/5/19 19:41
 * @Description:
 */
@RestController
@RequestMapping("admin/address")

public class AdminAddressController {

    @Autowired
    private MarketAddressService addressService;

    @RequestMapping("list")
    private Object list(Integer page, Integer limit, String name, String userId, String sort, String order) throws IOException {

        List<MarketAddress> marketAddressList = addressService.list(page, limit, name, userId, sort, order);
        return ResponseUtil.okList(marketAddressList);
    }


}
